package com.neusoft.neuiotms.dcom.converter.alter;

import org.springframework.stereotype.Component;

import com.neusoft.bizcore.web.dto.AbstractConverter;
import com.neusoft.neuiotms.dcom.dto.alter.AlterApplyFormAnnexDTO;
import com.neusoft.neuiotms.dcom.model.alter.AlterApplyFormAnnex;

@Component
public class AlterApplyFormAnnexConverter
        extends AbstractConverter<AlterApplyFormAnnex, AlterApplyFormAnnexDTO> {

    @Override
    public AlterApplyFormAnnex toModel(final AlterApplyFormAnnexDTO dto) {

        final AlterApplyFormAnnex model = new AlterApplyFormAnnex();
        model.setFsId(dto.getFsId());
        model.setName(dto.getName());
        return model;
    }

    @Override
    public AlterApplyFormAnnexDTO toDTO(final AlterApplyFormAnnex model,
            final boolean forListView) {

        final AlterApplyFormAnnexDTO dto = new AlterApplyFormAnnexDTO();
        dto.setId(model.getId());
        dto.setFsId(model.getFsId());
        dto.setName(model.getName());
        return dto;
    }
}
